import matplotlib.pyplot as plt
import numpy as np

x = list(map(float, input().split()))
y1 = list(map(float, input().split()))
y2 = list(map(float, input().split()))
y3 = list(map(float, input().split()))

x, y1, y2, y3 = np.asarray(x), np.asarray(y1), np.asarray(y2), np.asarray(y3)
plt.plot(x, y1, label='f(x)')
plt.plot(x, y2, label='g(x)')
plt.plot(x, y3, label='h(x)')
plt.legend()
plt.show()

normalized = list(map(float, input().split()))
extended = list(map(float, input().split()))
normalized, extended = np.asarray(normalized), np.asarray(extended)
y1 = np.zeros([len(normalized)])
y2 = np.zeros([len(extended)])
plt.title('normalized FPN')
plt.scatter(normalized, y1, marker='.')
plt.show()
plt.title('extended FPN')
plt.scatter(extended, y2, marker='.')
plt.show()